[8.2-stable] Remove lazy loading from thumbnail#3847
Merged
tvdeyen merged 2 commits into8.2-stablefrom Apr 22, 2026
Merged
Conversation
The [loading] opacity rule used a descendant selector which also matched the cloned img that CropperJS moves into its own canvas inside the thumbnail. If the clone's load event fired before the original's, the cropper UI was built while the loading attribute was still set, leaving the image inside the cropper invisible until the original fired its own load event. Scoping the rule to direct children keeps the hide/reveal behavior for our own placeholder while leaving nested imgs untouched. (cherry picked from commit ed85cc4)
Setting image.loading = "lazy" after image.src starts the fetch was a no-op. The loading attribute is consulted before fetch begins, and for detached Image instances the fetch starts immediately when src is set. The attribute never actually deferred anything here. Removing it makes the code honest about what happens and prevents accidental activation if the order is ever reversed in a context where lazy would be harmful, such as the crop dialog. (cherry picked from commit c8054ff)
3 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 8.2-stable #3847 +/- ##
===========================================
Coverage 98.06% 98.06%
===========================================
Files 322 322
Lines 8530 8530
===========================================
Hits 8365 8365
Misses 165 165 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tvdeyen
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This will backport the following commits from
mainto8.2-stable:Questions ?
Please refer to the Backport tool documentation